package com.paddyi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.paddyi.mapper.DocumentMapper;
import com.paddyi.model.Document;
import com.paddyi.service.IDocumentService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 *  (Document)
 * @author paddy
 * @since  2019-08-05 06:40:35
 */
@Service(version = "${demo.service.version}")
public class DocumentServiceImpl extends ServiceImpl<DocumentMapper, Document> implements IDocumentService {



    @Override
    @Transactional
    public List<Document> findAll() {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.orderByAsc("seq");
//        Document document = new Document();
//        document.setId(5L);
//        document.setName("bbb");
//        this.updateById(document);
//        int i = 1/0;
        return this.list(queryWrapper);
    }
}
